package com.diqizu.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import com.diqizu.entity.JxinFo;

import com.diqizu.utli.DBManager;
import com.diqizu.utli.QueryDataResult;

public class JxinFoDaoImpI {
	public ArrayList<JxinFo> getALljxinfo() {
		String sql = "select * from jxinfo";
		System.out.println("查询的语句是:" + sql);
		QueryDataResult execQuery = DBManager.execQuery(sql);
		ArrayList<JxinFo> list = new ArrayList<JxinFo>();
		if (execQuery != null) {
			ResultSet rs = execQuery.rs;
			try {
				while (rs.next()) {
					JxinFo e = new JxinFo();
					e.setId(rs.getInt(1));
					e.setBt(rs.getString(2));
					e.setNr(rs.getString(3));
					e.setZs(rs.getString(4));
					list.add(e);

				}
			} catch (SQLException e) {
				e.printStackTrace();
			} finally {
				execQuery.close();
			}
		}
		System.out.println(list);
		return list;
	}
}
